package io.gitee.zhangbinhub.admin.log.conf

import org.noear.solon.annotation.Configuration
import org.noear.solon.annotation.Inject

/**
 * @since JDK 11
 */
@Configuration
class LogServerCustomerConfiguration {
    @Inject($$"${solon.logging.appender.file.name}", autoRefreshed = true)
    var logFile: String = ""

    /**
     * 日志路径
     */
    @Inject($$"${acp_log_path:logs}", autoRefreshed = true)
    var logFilePath: String = ""

    /**
     * 日志最大保留天数，默认 180 天
     */
    @Inject($$"${log-server.max-history-day-number}", autoRefreshed = true)
    var maxHistoryDayNumber: Int = 180

    /**
     * 是否记录路由日志
     */
    @Inject($$"${log-server.route-log.enabled}", autoRefreshed = true)
    var routeLogEnabled: Boolean = true

    /**
     * 是否记录操作日志
     */
    @Inject($$"${log-server.operate-log.enabled}", autoRefreshed = true)
    var operateLogEnabled: Boolean = true

    /**
     * 日志迁移时，单个事务处理的日志记录数量
     */
    @Inject($$"${log-server.quantity-per-process}", autoRefreshed = true)
    var quantityPerProcess: Int = 100

}
